package nlppatents.apps;

/*
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
*/
public class Tester 
{

	public static void main(String args[]) 
	{
		/*
		String aFile = "7000018.txt";
		ArrayList<Sentence> sentences = new ArrayList<Sentence>();
		Sentence s = null;
		
		// init all that needs be init'd
		POS.init();
		POSWord.init();
		DictWord.init();
		
		// read our file and make some sentences
		try {
			BufferedReader input = new BufferedReader(new FileReader(aFile));
			try 
			{
				String line = null; //not declared within while loop
				while ((line = input.readLine()) != null) 
				{
					if(line.trim().length() > 0)
					{
						s = Sentence.parseRawSentence(line, true);
						sentences.add(s);
					}
					//contents.append(line);
					//contents.append(System.getProperty("line.separator"));
				}
			} finally {
				input.close();
			}
		} catch (IOException ex) {
			ex.printStackTrace();
		}
		
		for(int i = 0; i < sentences.size(); i++)
		{
			System.out.println("Sentence " + i + ":");
			s = sentences.get(i);
			for(int j = 0; j < s.sentence.size(); j++)
			{
				Phrase p = s.sentence.get(j);
				System.out.print("   " + p.type.label + ": ");
				for(int k = 0; k < p.length(); k++)
				{
					System.out.print(p.get(k).word);
					System.out.print(" ");
				}
				System.out.print("\n");
			}
		}
		*/
		
		/*
		String tester = "The quick brown fox";
		int i = tester.indexOf(' ');
		System.out.println("Substr: \"" + tester.substring(0, i) + "\"");
		*/
		
		/*System.out.println("1234".substring(0, 1));
		System.out.println("done");
		*/
	}

}
